![]() |
GetMenuItemProperty |
||||
Header: | Menus.h | Carbon status: | Supported | |
Obtains a piece of data that has been previously associated with a menu item.
OSStatus GetMenuItemProperty ( MenuHandle menu, UInt16 item, OSType propertyCreator, OSType propertyTag, UInt32 bufferSize, UInt32 *actualSize, void *propertyBuffer );
A handle to the menu containing the item to be examined for associated data.
The item number of the menu item or 0 if the data is associated with the menu as a whole.
A four-character code. Pass your program’s signature, as registered through Apple Developer Technical Support. If your program is of a type that would not normally have a signature (for example, a plug-in), you should still register and use a signature in this case, even though your program’s file may not have the same creator code as the signature that you register. The 'macs' property signature is reserved for the system and should not be used.
A four-character code. Pass the application-defined code identifying the data.
The size of the data to be obtained. If this is unknown, use the function GetMenuItemPropertySize to get the data’s size. If the size specified in the bufferSize parameter does not match the actual size of the property, GetMenuItemProperty only retrieves data up to the size specified or up to the actual size of the property, whichever is smaller, and an error is returned.
On input, a pointer to an unsigned 32-bit integer. On return, this value is set to the actual size of the associated data. You may pass null for the actualSize parameter if you are not interested in this information.
On input, a pointer to a buffer. On return, this buffer contains a copy of the data that is associated with the specified menu item.
A result code.
You may use the function GetMenuItemProperty to obtain a copy of data previously set with the function SetMenuItemProperty.
See also the RemoveMenuItemProperty function.
This function is available with Mac OS 8.5 and later.
Supported in Carbon. Available in CarbonLib 1.0 and later when MenusLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by MenusLib 8.5 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)